package besta.moon.sql.expression.function.numeric;

import besta.moon.sql.parser.SQLTokenizer;
import besta.moon.sql.expression.function.FunctionReturnFloat;

public final class FunctionCos extends FunctionReturnFloat {

    @Override
    public final int getFunction() {
        return SQLTokenizer.COS;
    }

    @Override
    public final double getDouble() throws Exception {
        if (isNull()) {
            return 0;
        }
        return Math.cos(param1.getDouble());
    }
}
